﻿using IndoorPosition.Server.Core.Utils;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IndoorPosition.Server.Application
{
    /// <summary>
    /// 项目管理逻辑接口
    /// </summary>
    public interface IProjectService
    {
        /// <summary>
        /// 添加项目
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> AddAsync(ProjectInputDto input);

        /// <summary>
        /// 删除项目
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);

        /// <summary>
        /// 更新项目信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateAsync(ProjectDto input);

        /// <summary>
        /// 分页获取项目信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedList<ProjectDto>> ListAsync(PageInputDto input);

        /// <summary>
        /// 获取所有的项目
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<ProjectDto>> ListAllAsync(SearchInputDto input);

        /// <summary>
        /// 上传路径文件
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<string> UploadRouteAsync(IFormFile file);

        /// <summary>
        /// 下载路径文件
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        Task<IActionResult> DownloadRouteAsync(string fileName);
    }
}
